@extends('host.common.common')
@section('head')
    <script>
        var PAGE_DATA = {
            pagingObj : {
                total : "0",
                pageSize : "7",
                page : "1"
            },
            main_ad_url: "",
            main_catog_data: $.parseJSON('{!! \App\B2BProject\Custom\Business\GoodsCategory::jsonDataGenerate() !!}'),
            main_ad_img: "/assets/b2b/css/images/distribution.jpg", // 上部大广告图片;
            time_data : [
                {code:"0", text:"升序  ↑"},
                {code:"1", text:"降序  ↓"}
            ],

        };

    </script>
    <script src="/assets/b2b/js/pageConfig.js"></script>
    <script type="text/javascript" src="/assets/b2b/js/libs/jquery-1.11.3.min.js"></script>
    <script type="text/javascript" src="/assets/b2b/js/libs/underscore-min.js"></script>
     <script type="text/javascript" src="/assets/b2b/js/libs/page/template-util.js"></script>

    @stop
    @section('body')
            <!-- top_test -->
    <div id="top_test"></div>

    <!-- web_logo_search -->
    <div id="web_logo_search"></div>

    <!-- comm_nav -->
    <div id="comm_nav"></div>
    <div class="com-w ">
        <div class="com-w-main">
            <div class="top-navigation">
                <span class="top-bg-img clearfix"></span>
                您当前的位置：
                <a href="{{route('host')}}">首页</a>
                > 供采分销区
            </div>
            <div class="top-main-img">
                <a href="javascript:void(0)">
                    <img id="main-ad-img" src=""></a>
            </div>
            <div id="main-tab" class="top-main-btn"></div>

            <div class="main-filter">
                <span class="filter-sort">排序</span>
        <span class="sort-select">
          <select id="sel_time"></select>
          <select id="sel_addr"></select>
        </span>
        <span class="filter-right">
          <input id="search-good" type="text" />
          <input id="good-type" type="hidden" />
          <a id="search-btn" class="btn btn-warn btn-w62x28 lh15">搜索</a>
        </span>
        <span id="display-format" class="filter-right1">
          <div format="0" class="clearfix" style="float: left;line-height: 38px;cursor: pointer;">
              <label>
                  <span class="b-img-bg"></span>
              </label>
              大图
          </div>
          <div format="1" class="clearfix" style="float: left;line-height: 38px;cursor: pointer;">
              <label>
                  <span class="list-img-bg"></span>
              </label>
              列表
          </div>
        </span>
            </div>

            <div id="info-list">
                <div class="shop-list">
                    <div class="head">
                        <ul class="clearfix">
                            <li class="wb15">图片</li>
                            <li class="wb20">商品信息</li>
                            <li class="wb10">单价</li>
                            <li class="wb10">起订量</li>
                            <li class="wb20">供应商</li>
                            <li class="wb20">供应商地址</li>
                        </ul>
                    </div>
                    <div class="head-main" id="goods-list"></div>
                </div>

            </div>
            <div id="goods-box" style="display:none;"></div>

            <div class="comm-paging" id="comm-paging" style="float:right;"></div>
        </div>
    </div>
    <!-- foot_nav -->
    <div id="foot_nav"></div>
    <div id="bottom_main"></div>


    <script type="text/template" id="info-list-templ">
        <% _.each(obj, function(item){ %>
        <ul class='clearfix'>
            <li class='wb15'><a href='<%=item.href%>'><img src='<%=item.img%>' /></a></li>
            <li class='wb20'><a class='shop-nam' href='<%=item.href%>' title="<%=item.name%>"><%=item.name%></a></li>
                <% if(COMM_DATA.topObj.loginFlag == "1"){ //已登录 %>
                <% if(item.authority) { // 已授权 %>
            <li class='wb10 unit-price f18'>
                <span class='price'>￥<%=item.price%></span>aa
                <% } else { // 未授权 %>
            <li class='wb10 unit-price f18' style="line-height: 0px;">
                <a class="btn btn-default btn-w70x32 mt60 unauthorized" href="<%=item.login_auth_href%>">未授权</a>
                <% } } else { // 未登录 %>
            <li class='wb10 unit-price f18 ' style="line-height: 0px;">
                <a class="btn btn-default btn-w70x32 mt60 unauthorized" href="<%=item.login_auth_href%>">请登录</a>
                <% } %>

            </li>
            <li class='wb10 MOQ text'><%=item.minimum%></li>
            <li class='wb20 text'><%=item.supplier%></li>
            <li class='wb20'><%=item.addr%></li>
        </ul>
        <% });%>
    </script>

    <script type="text/template" id="info-box-templ">
        <div class="shop-list clearfix">
            <div class="shop-list-box clearfix">
                <% _.each(obj, function(item){ %>
                <div class="clearfix list-box fl">
                    <div class="l-b-img mt10 ml10">
                        <a href="<%=item.href%>"><img src="<%=item.img%>" /></a>
                    </div>
                    <div class="l-b-text mt10 ml10 lh20">
                        <a href="<%=item.href%>" class="c-coffee f14 fl" title="<%=item.name%>"><%=item.name%></a>
                    </div>
                    <div class="lh20 text ml10">
                        <a href="<%=item.href%>" class="c-999"><%=item.supplier%></a>
                    </div>
                    <div class="l-b-b clearfix mt20">

                        <% if(COMM_DATA.topObj.loginFlag == "1"){ //已登录 %>
                        <% if(item.authority ) { // 已授权 %>
                        <%if(item.authority == "未授权"){%>
                        <div class="fl b002 f16 text ml10 wb50"><a class="btn btn-default btn-w70x32 unauthorized" style="margin-top: -5px;margin-left: 10px;" >未授权</a></div>
                        <%} else {%>
                        <div class="fl b002 f16 text ml10 wb50"><a class="btn btn-default btn-w70x32 unauthorized" style="margin-top: -5px;margin-left: 10px;" href="<%=item.login_auth_href%>">未授权</a></div>
                        <%}%>
                        <% } else { // 未授权 %>
                        <a class="btn btn-default btn-w70x32 unauthorized" style="margin-top: -5px;margin-left: 10px;" href="<%=item.login_auth_href%>">未授权</a>
                        <% } } else { // 未登录 %>
                        <a class="btn btn-default btn-w70x32 unauthorized" style="margin-top: -5px;margin-left: 10px;" href="<%=item.login_auth_href%>">请登录</a>
                        <% } %>



                        <div class="fr b002 f16 text mr10 wb41">
                            <span class="f14 c-666 lh20 text fl">起订量:</span>
                            <span class="f14 c-666 lh20 text fl wb50"><%=item.minimum%></span>
                        </div>
                    </div>
                </div>
                <% });%></div>
        </div>
    </script>

    <link rel="stylesheet" href="/assets/b2b/css/ui-dialog.css">

    <script   src="/assets/b2b/js/libs/jquery.paging.min.js"></script>

    <script src="/assets/b2b/js/libs/dialog-min.js"></script>

    <script src="/assets/b2b/js/pageModules/common/C3.js"></script>


@stop

